<template>
  
  <a-tree-select
    allowClear
    style="width: 100%"
    :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
    :treeData="treeData"
    treeNodeFilterProp="title"
    placeholder="请选择"
    treeDefaultExpandAll
    multiple
    :treeCheckable="true"
    v-model="value"
  >
    <!-- <span style="color: #08c" slot="title" slot-scope="{key, value}" v-if="key='0-0-1'">
      Child Node1 {{value}}
    </span> -->
  </a-tree-select>
</template>

<script>

  const treeData = [
    {
      title: '管理员1',
      value: '0',
      key: '0',
      selectable:false,
    },
    {
      title: '管理员2',
      value: '1',
      key: '1',
      selectable:false,
    },
    {
      title: '管理员3',
      value: '2',
      key: '2',
      selectable:false,
    },
  ];
  export default {
    props: ['currentValue'],
    data() {
      return {
        value: [],
        treeData,
      };
    },
    watch: {
      value(key) {
        // this.currentValue = value
        console.log(key)
        this.$emit('input',key)
      },
    },
  };
</script>
